package com.sdleyou.treepro.manager.api.slogan;

import com.sdleyou.treepro.common.model.utils.ResultVOUtil;
import com.sdleyou.treepro.common.model.vo.ResultVO;
import com.sdleyou.treepro.common.model.vo.SloganVO;
import com.sdleyou.treepro.common.service.SloganManager;
import com.sdleyou.treepro.system.version.ApiVersion;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 标语控制器
 *
 * @author gx
 * @version v1.0
 * 2020年2月21日
 */
@RestController
@RequestMapping("/api")
public class ManagerSloganController {
    @Autowired
    private SloganManager sloganManager;

    @ApiVersion(1)
    @PostMapping("/{version}/manager/slogan")
    public ResultVO create(@RequestBody SloganVO sloganVO) {
        sloganManager.createSlogan(sloganVO);
        return ResultVOUtil.success();
    }

}
